#include <bits/stdc++.h>
using namespace std;
class NumArray {
public:
    vector<int> num;
    NumArray(vector<int>& nums) {
        num = nums;
    }
    
    int sumRange(int left, int right) {
        return accumulate(num.begin()+left, num.begin()+right+1, 0);
    }   
};